import java.util.Scanner;

public class Main {
    public static int fun(int n) {
        if(n==1){
            return n;
        }
        else {
            return n*fun(n-1);
        }
    }
    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.println("请输入一个数字用于求该数字的阶乘：");
    int n=sc.nextInt();
    int ret=fun(n);
        System.out.println(ret);
    }




    // 返回两个整数中的较大值
    public static int max(int a, int b) {
        return a>b?a:b;
    }
    public static double max(double a, double b, double c) {
        double max = a;
        if (b > max) {
            max = b;
        }
        if (c > max) {
            max = c;
        }
        return max;
    }

    public static void main1(String[] args) {

        System.out.println(max(1, 9));

        System.out.println(max(1.1, 8.1, 9.9));
    }
}